/*
 * @Author: wangc
 * @Date: 2020-08-13 19:26:52
 * @LastEditTime: 2020-08-30 15:21:43
 * @Description: 
 */
package com.example.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.example.mapper.UserMapper;
import com.example.model.User;
import com.example.service.UserService;

import org.springframework.stereotype.Service;

@Service(value = "userService")
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;


    @Override
    public List<User> getAllUser() {
        return userMapper.getAllUser();
    }

    @Override
    public User checkLogin(String username,String password) {
        return userMapper.checkLogin(username,password);
    }

    @Override
    public User getUserbyUsername(String username) {
        return userMapper.getUserbyUsername(username);
    }

    @Override
    public int register(User user) {
        return userMapper.register(user);
    }

    @Override
    public int deleteUserById(int id) {
        return userMapper.deleteUserById(id);
    }
}